<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>12.JS基本语法</title>
</head>
<body>
    <script>
        var x;
        let y = 6;
        const PI = 3.14;

        console.log(x, y, PI);

        let txtx1 = "如花似玉";
        console.log(txtx1);
        console.log(null);

        if (y == 5) {
            console.log('y=5');
        } 
        else if (y == 6) {
            console.log('y=6');
            
        }
        else {
            console.log('y!=5');
        }

        for (let index = 0; index < 6; index++) {
            console.log('loop iter= ', index);
        }
        let idx=0;
        while (idx<8) {
            console.log(idx);
            idx++;
        }

    </script>
</body>
</html>